import Cookies from "js-cookie";
const userInfo = Cookies.get("userInfo") ? JSON.parse(Cookies.get("userInfo")) : {};
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  userInfo: state => (state.user.userInfo && state.user.userInfo.id) ? state.user.userInfo : userInfo
}
export default getters
